//
//  MOFinishDoDetailViewController.m
//  MobileOffice
//
//  Created by 冰冰 on 2019/6/23.
//  Copyright © 2019 com.idolmedia. All rights reserved.
//。已办详情

#import "MOFinishDoDetailViewController.h"
#import "MOFinishDoDetail_DoingViewController.h"
#import "MOFinishDoDetail_MainViewController.h"
#import "MOFinishDoDetail_IdeaViewController.h"
#import "MOWaitDoDetail_DoingModel.h"
#import "MOWaitDoDetail_HuiQianViewController.h"

@interface MOFinishDoDetailViewController ()<SNPageTabViewDelegate>

@property(nonatomic,strong)SNPageTabView *pageTabView;

@property(nonatomic,strong)MOFinishDoDetail_DoingViewController *title_1VC;

@property(nonatomic,strong)MOFinishDoDetail_MainViewController *title_2VC;

@property(nonatomic,strong)MOFinishDoDetail_IdeaViewController *title_3VC;

@property(nonatomic,strong)MOWaitDoDetail_HuiQianViewController *title_4VC;

//处理详情数据数组
@property(nonatomic,strong)NSMutableArray *finishDoDetail_Doing_DataArray;
//正文附件数据数组
@property(nonatomic,strong)NSMutableArray *finishDoDetail_Main_DataArray;
//已办详情---注办意见
@property(nonatomic,strong)NSMutableArray *finishDoDetail_Doing_IdeaArray;
//已办详情领导批示
@property(nonatomic,strong)NSMutableArray *finishDoDetail_Doing_AgreeArray;


@end

@implementation MOFinishDoDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"公文详情";
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self creatSegumentView];
    
    [self getData];
    
    if ([self.waitModel.wdlx isEqualToString:@"发文处理单"]) {//发文有收回功能
        [self creatBottomView];
    }
}

-(void)creatSegumentView
{
    self.title_1VC = [[MOFinishDoDetail_DoingViewController alloc] init];
    self.title_1VC.waitModel = self.waitModel;
    self.title_1VC.view.backgroundColor = [UIColor whiteColor];
    
    self.title_2VC = [[MOFinishDoDetail_MainViewController alloc] init];
    self.title_2VC.waitModel = self.waitModel;
    self.title_2VC.typeStr = self.typeStr;
    self.title_2VC.searchConditionArray = self.searchConditionArray;
    self.title_2VC.view.backgroundColor = [UIColor whiteColor];
    
    self.title_3VC = [[MOFinishDoDetail_IdeaViewController alloc] init];
    self.title_3VC.waitModel = self.waitModel;
    self.title_3VC.typeStr = self.typeStr;
    self.title_3VC.view.backgroundColor = [UIColor whiteColor];
    
    [self addChildViewController:self.title_1VC];
    [self addChildViewController:self.title_2VC];
    [self addChildViewController:self.title_3VC];
    
    if ([self.waitModel.wdlx isEqualToString:@"发文处理单"]) {
        self.title_4VC = [[MOWaitDoDetail_HuiQianViewController alloc]init];
        self.title_4VC.isFinish = @"1";
        [self addChildViewController:self.title_4VC];
        _pageTabView = [[SNPageTabView alloc] initWithChildControllers:self.childViewControllers childTitles:@[@"处理详情", @"正文附件",@"处理意见",@"会签意见"]];
        _pageTabView.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-StatusBarAndNavigationBarHeight - 50);
    }else{
        _pageTabView = [[SNPageTabView alloc] initWithChildControllers:self.childViewControllers childTitles:@[@"处理详情", @"正文附件",@"处理意见"]];
        _pageTabView.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-StatusBarAndNavigationBarHeight);
    }
    
    _pageTabView.tabSize = CGSizeMake(SCREEN_WIDTH, 41);
    _pageTabView.tabItemFont = FONT_SIZE(14);
    _pageTabView.unSelectedColor = KBlackColor_919395;
    _pageTabView.selectedColor = KBlackColor_2A2A2A;
    _pageTabView.tabBackgroundColor = [UIColor whiteColor];
    _pageTabView.bodyBounces = NO;
    _pageTabView.titleStyle = SNPageTabTitleStyleDefault;
    _pageTabView.indicatorStyle = SNPageTabIndicatorStyleFollowText;
    _pageTabView.indicatorHeight = 2;
    _pageTabView.delegate = self;
    _pageTabView.selectedTabIndex = 0;
    _pageTabView.lineView.hidden = YES;
    [self.view addSubview:_pageTabView];
    
}

-(void)getData
{
    self.finishDoDetail_Doing_DataArray = [NSMutableArray array];
    self.finishDoDetail_Main_DataArray = [NSMutableArray array];
    self.finishDoDetail_Doing_IdeaArray = [NSMutableArray array];
    self.finishDoDetail_Doing_AgreeArray = [NSMutableArray array];
    
    if ([self.typeStr integerValue]==2) {//已办
        
        if ([self.waitModel.wdlx isEqualToString:@"收文处理单"]){//收文
            
            NSString *url = [NSString stringWithFormat:@"%@/%@?authorization=%@",ODPSSUYB_ODPSYBQUERYSWCLD_URL,self.waitModel.key,[NSString URLEncodedString:[MOUser sharedMOUser].token]];
            
            [PPNetworkHelper GET:url parameters:@{} success:^(id responseObject) {
                NSLog(@"已办处理单详情（收文）：%@",responseObject);
                if ([responseObject[@"status"] integerValue]==1) {
                    
                    //已办详情---处理详情
                    NSDictionary *dataDic = responseObject[@"swcld"][0];
                    NSArray *titleArr = @[@"新疆税务局收文处理单",@"缓急:",@"标题:",@"密级:",@"主办单位:",@"总收支号:",@"办理类型:",@"来文字号:",@"收文日期:",@"限办日期:",@"来文单位:",@"会办单位:",@"拟办意见:",@"附注:"];
                    
                    for (int i=0; i<titleArr.count; i++) {
                        
                        MOWaitDoDetail_DoingModel *model = [[MOWaitDoDetail_DoingModel alloc]init];
                        switch (i) {
                            case 0:
                                model.nameStr = titleArr[i];
                                model.valueStr = @"";
                                model.isCenter = @"1";
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 1:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"hj"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 2:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"bt"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 3:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"mj"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 4:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"zbdw"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 5:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"zswh"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 6:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"bllx"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 7:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"lwzh"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 8:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"hswrqj"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 9:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"xbrq"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 10:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"lwdw"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 11:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"hbdw"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 12:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@""];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                            case 13:
                                model.nameStr = titleArr[i];
                                model.valueStr = dataDic[@"fz"];
                                [self.finishDoDetail_Doing_DataArray addObject:model];
                                break;
                                
                            default:
                                break;
                        }
                    }
                    self.title_1VC.getDataArray = self.finishDoDetail_Doing_DataArray;
                    
                    //已办详情---注办意见
                    NSArray *yyArrar = dataDic[@"zbyjList"];
                    for (int i = 0; i<yyArrar.count; i++) {
                        [self.finishDoDetail_Doing_IdeaArray addObject:yyArrar[i]];
                    }
                    self.title_1VC.finishDoDetail_Doing_IdeaArray = self.finishDoDetail_Doing_IdeaArray;
                    
                    //已办详情领导批示
                    //dataDic
                    NSArray *agreeArray = dataDic[@"ldpslist"];
                    for (int i = 0; i<agreeArray.count; i++) {
                        [self.finishDoDetail_Doing_AgreeArray addObject:agreeArray[i]];
                    }
                    self.title_1VC.finishDoDetail_Doing_AgressArray = self.finishDoDetail_Doing_AgreeArray;
                    
                    //已办详情---征文附件
                    NSArray *fjArray = dataDic[@"fjlist"];
                    self.finishDoDetail_Main_DataArray = [NSMutableArray arrayWithArray:fjArray];
                    self.title_2VC.finishDoDetail_Main_DataArray = self.finishDoDetail_Main_DataArray;
                }
                
            } failure:^(NSError *error) {
                NSLog(@"已办处理单详情（收文）：%@",[error localizedDescription]);
            }];
            
        }else if ([self.waitModel.wdlx isEqualToString:@"发文处理单"]){//发文
            
            NSString *url = [NSString stringWithFormat:@"%@/%@?authorization=%@",ODPSSUYB_ODPSYBQUERYFWCLD_URL,self.waitModel.key,[NSString URLEncodedString:[MOUser sharedMOUser].token]];
            
            [PPNetworkHelper GET:url parameters:@{} success:^(id responseObject) {
                NSLog(@"已办处理单详情（发文）：%@",responseObject);
                
                NSDictionary *dataDic = responseObject[@"twfz"];
                NSArray *titleArr = @[@"",@"缓急:",@"标题:",@"密级:",@"主办单位:",@"总收支号:",@"办理类型:",@"来文字号:",@"收文日期:",@"限办日期:",@"来文单位:",@"会办单位:",@"批注:",@"办理情况:",@"",@"",@"",@""];
                for (int i=0; i<titleArr.count; i++) {
                    MOWaitDoDetail_DoingModel *model = [[MOWaitDoDetail_DoingModel alloc]init];
                    switch (i) {
                        case 0:
                            model.nameStr = @"新疆税务局发文处理单";
                            model.valueStr = @"";
                            model.isCenter = @"1";
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 1:
                            model.nameStr = @"保密期限:";
                            model.valueStr = dataDic[@"bmqx"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 2:
                            model.nameStr = @"缓急:";
                            model.valueStr = dataDic[@"hj"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 3:
                            model.nameStr = @"发文字号:";
                            model.valueStr = dataDic[@"fwzh"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 4:
                            model.nameStr = @"签发:";
                            model.valueStr = dataDic[@"qf"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 5:
                            model.nameStr = @"初核:";
                            model.valueStr = dataDic[@"ch"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 6:
                            model.nameStr = @"主办部门:";
                            model.valueStr = dataDic[@"zbbm"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 7:
                            model.nameStr = @"拟稿人:";
                            model.valueStr = dataDic[@"ngr"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 8:
                            model.nameStr = @"电话:";
                            model.valueStr = dataDic[@"dh"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 9:
                            model.nameStr = @"拟稿日期:";
                            model.valueStr = dataDic[@"xbrq"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 10:
                            model.nameStr = @"审稿:";
                            model.valueStr = dataDic[@"sg"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 11:
                            model.nameStr = @"标题:";
                            model.valueStr = dataDic[@"bt"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 12:
                            model.nameStr = @"信息公开:";
                            model.valueStr = dataDic[@"xxgk"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 13:
                            model.nameStr = @"政策解读:";
                            model.valueStr = dataDic[@"zcjd"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 14:
                            model.nameStr = @"主送:";
                            model.valueStr = dataDic[@"zs"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 15:
                            model.nameStr = @"抄送:";
                            model.valueStr = dataDic[@"cs"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 16:
                            model.nameStr = @"附件:";
                            model.valueStr = dataDic[@"fj"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                        case 17:
                            model.nameStr = @"附注:";
                            model.valueStr = dataDic[@"fz"];
                            [self.finishDoDetail_Doing_DataArray addObject:model];
                            break;
                            
                        default:
                            break;
                    }
                    self.title_1VC.getDataArray = self.finishDoDetail_Doing_DataArray;
                    
                    //待办详情---征文附件
                    NSArray *fjArray = responseObject[@"fj"];
                    self.finishDoDetail_Main_DataArray = [NSMutableArray arrayWithArray:fjArray];
                    self.title_2VC.finishDoDetail_Main_DataArray = self.finishDoDetail_Main_DataArray;
                    
                    //处理意见
                    NSArray *ideaA = responseObject[@"clyjObj"];
                    self.title_3VC.finishIdeaArray = [NSMutableArray arrayWithArray:ideaA];
                    
                    //会签意见
                    NSArray *huiQian = responseObject[@"hqyj"];
                    self.title_4VC.huiQianDataArray = [NSMutableArray arrayWithArray:huiQian];
                }
                
            } failure:^(NSError *error) {
                NSLog(@"待办处理单详情（发文）：%@",[error localizedDescription]);
            }];
            
        }
        
    }else{//查询
        
        
        if ([self.waitModel.wdlx isEqualToString:@"收文处理单"]){//收文
            
            //查询详情---处理详情
            NSDictionary *dataDic = self.postDic[@"twfz"];
            NSArray *titleArr = @[@"新疆税务局收文处理单",@"缓急:",@"标题:",@"密级:",@"主办单位:",@"总收支号:",@"办理类型:",@"来文字号:",@"收文日期:",@"限办日期:",@"来文单位:",@"会办单位:",@"拟办意见:",@"附注:"];
            
            self.title_2VC.resultDic = dataDic;
            
            for (int i=0; i<titleArr.count; i++) {
                
                MOWaitDoDetail_DoingModel *model = [[MOWaitDoDetail_DoingModel alloc]init];
                switch (i) {
                    case 0:
                        model.nameStr = titleArr[i];
                        model.valueStr = @"";
                        model.isCenter = @"1";
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 1:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"hj"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 2:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"bt"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 3:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"mj"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 4:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"zbdw"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 5:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"zswh"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 6:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"bllx"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 7:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"fwzh"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 8:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"swrq"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 9:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"bmqx"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 10:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"lwdw"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 11:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"hbdw"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 12:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@""];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 13:
                        model.nameStr = titleArr[i];
                        model.valueStr = dataDic[@"fz"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                        
                    default:
                        break;
                }
                
                self.title_1VC.getDataArray = self.finishDoDetail_Doing_DataArray;
                
                //查询详情领导批示
                //dataDic
                NSArray *agreeArray = dataDic[@"ldpslist"];
                for (int i = 0; i<agreeArray.count; i++) {
                    [self.finishDoDetail_Doing_AgreeArray addObject:agreeArray[i]];
                }
                self.title_1VC.finishDoDetail_Doing_AgressArray = self.finishDoDetail_Doing_AgreeArray;
                
                //zbyj
                NSArray *daArr = self.postDic[@"zbyj"];
                for (int i = 0; i<daArr.count; i++) {
                    [self.finishDoDetail_Doing_IdeaArray addObject:daArr[i]];
                }
                self.title_1VC.finishDoDetail_Doing_IdeaArray = self.finishDoDetail_Doing_IdeaArray;
                
                //查询详情---征文附件
                NSArray *fjArray;
                if ([dataDic[@"fj"] isKindOfClass:[NSArray class]]) {
                    fjArray = dataDic[@"fj"];
                }else{
                    fjArray = dataDic[@"fjlist"];
                }
                self.finishDoDetail_Main_DataArray = [NSMutableArray arrayWithArray:fjArray];
                self.title_2VC.finishDoDetail_Main_DataArray = self.finishDoDetail_Main_DataArray;
                
                //意见
                NSArray *ideaArray = self.postDic[@"clyjList"];
                self.title_3VC.listArray = [NSMutableArray arrayWithArray:ideaArray];
                
            }
            
        }else{//查询发文
            
            //查询详情---处理详情
            NSDictionary *dataDic = self.postDic[@"twfz"];
            NSArray *titleArr = @[@"",@"缓急:",@"标题:",@"密级:",@"主办单位:",@"总收支号:",@"办理类型:",@"来文字号:",@"收文日期:",@"限办日期:",@"来文单位:",@"会办单位:",@"批注:",@"办理情况:",@"",@"",@"",@""];
            
            self.title_2VC.resultDic = dataDic;
            
            for (int i=0; i<titleArr.count; i++) {
                
                MOWaitDoDetail_DoingModel *model = [[MOWaitDoDetail_DoingModel alloc]init];
                switch (i) {
                    case 0:
                        model.nameStr = @"新疆税务局发文处理单";
                        model.valueStr = @"";
                        model.isCenter = @"1";
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 1:
                        model.nameStr = @"保密期限:";
                        model.valueStr = dataDic[@"bmqx"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 2:
                        model.nameStr = @"缓急:";
                        model.valueStr = dataDic[@"hj"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 3:
                        model.nameStr = @"发文字号:";
                        model.valueStr = dataDic[@"fwzh"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 4:
                        model.nameStr = @"签发:";
                        model.valueStr = dataDic[@"qf"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 5:
                        model.nameStr = @"初核:";
                        model.valueStr = dataDic[@"ch"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 6:
                        model.nameStr = @"主办部门:";
                        model.valueStr = dataDic[@"zbbm"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 7:
                        model.nameStr = @"拟稿人:";
                        model.valueStr = dataDic[@"ngr"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 8:
                        model.nameStr = @"电话:";
                        model.valueStr = dataDic[@"dh"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 9:
                        model.nameStr = @"拟稿日期:";
                        model.valueStr = dataDic[@"xbrq"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 10:
                        model.nameStr = @"审稿:";
                        model.valueStr = dataDic[@"sg"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 11:
                        model.nameStr = @"标题:";
                        model.valueStr = dataDic[@"bt"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 12:
                        model.nameStr = @"信息公开:";
                        model.valueStr = dataDic[@"xxgk"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 13:
                        model.nameStr = @"政策解读:";
                        model.valueStr = dataDic[@"zcjd"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 14:
                        model.nameStr = @"主送:";
                        model.valueStr = dataDic[@"zs"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 15:
                        model.nameStr = @"抄送:";
                        model.valueStr = dataDic[@"cs"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 16:
                        model.nameStr = @"附件:";
                        model.valueStr = dataDic[@"fj"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                    case 17:
                        model.nameStr = @"附注:";
                        model.valueStr = dataDic[@"fz"];
                        [self.finishDoDetail_Doing_DataArray addObject:model];
                        break;
                        
                    default:
                        break;
                }
                
                self.title_1VC.getDataArray = self.finishDoDetail_Doing_DataArray;
                
                
                //查询详情---征文附件
                NSArray *fjArray;
                if ([dataDic[@"fj"] isKindOfClass:[NSArray class]]) {
                    fjArray = dataDic[@"fj"];
                }else{
                    fjArray = dataDic[@"fjlist"];
                }
                self.finishDoDetail_Main_DataArray = [NSMutableArray arrayWithArray:fjArray];
                self.title_2VC.finishDoDetail_Main_DataArray = self.finishDoDetail_Main_DataArray;
                
                //处理意见
                NSArray *ideaA = self.postDic[@"clyjList"];
                self.title_3VC.finishIdeaArray = [NSMutableArray arrayWithArray:ideaA];
                
                //会签意见
                NSArray *huiQian = self.postDic[@"hqxx"];
                self.title_4VC.huiQianDataArray = [NSMutableArray arrayWithArray:huiQian];
                
            }
            
        }
        
    }
    
}

#pragma mark --//收回
-(void)clickButton
{
    MOHintView *hintView = [[MOHintView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) andContentStr:@"确定要收回此公文？"];
    __weak typeof (self)weakSelf = self;
    hintView.clickSureButtonBlock = ^{
        [weakSelf seaveData];
    };
    [WINDOW addSubview:hintView];
}

-(void)seaveData
{
    NSString *url = [NSString stringWithFormat:@"%@/%@?authorization=%@",ODPSSUYB_ODPSYBBACK_URL,self.waitModel.key,[NSString URLEncodedString:[MOUser sharedMOUser].token]];
    
    [PPNetworkHelper GET:url parameters:@{} success:^(id responseObject) {
        NSLog(@"已办收回：%@",responseObject);
        if ([responseObject[@"status"] integerValue]==1) {
            [self.navigationController popViewControllerAnimated:YES];
            [[NSNotificationCenter defaultCenter]postNotificationName:@"officeTextStatusChange" object:nil];
        }
        [[ADShowMessage shareShowMessage]showTextOnly:responseObject[@"msg"] showInView:self.view];
        
    } failure:^(NSError *error) {
        NSLog(@"已办收回：%@",[error localizedDescription]);
    }];
}

#pragma mark -- 懒加载
-(void)creatBottomView
{
    UIView *bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, _pageTabView.bottom, SCREEN_WIDTH, 50)];
    bottomView.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:bottomView];
    
    UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, bottomView.width, 50)];
    button.titleLabel.font = FONT_SIZE(10);
    [button setTitle:@"收回" forState:UIControlStateNormal];
    [button setTitleColor:KBlueColor_2C94FF forState:UIControlStateHighlighted];
    [button setTitleColor:KBlackColor_2A2A2A forState:UIControlStateNormal];
    [button addTarget:self action:@selector(clickButton) forControlEvents:UIControlEventTouchUpInside];
    [button setImage:IMAGE(@"tuihui1") forState:UIControlStateNormal];
    [button setImage:IMAGE(@"tuihui2") forState:UIControlStateHighlighted];
    [bottomView addSubview:button];
    
}


@end
